Post a Comment
Kid professor
hhhhhhhhhhhhhhhhh
nnnnnnnnnnnnnnnn
jjjjjjjjjjjjjjj
Kid professor
hhhhhhhhhhhhhhhhh
nnnnnnnnnnnnnnnn
jjjjjjjjjjjjjjj
Kid professor
hhhhhhhhhhhhhhhhh
nnnnnnnnnnnnnnnn
jjjjjjjjjjjjjjj
Kid professor
hhhhhhhhhhhhhhhhh
nnnnnnnnnnnnnnnn
jjjjjjjjjjjjjjj
var x = 0;
do
{
x = window.prompt("What is my favorite number?", x);
// Did the user cancel? If so, break out of the loop
if (x == null)
break;
// Did they enter a number?
// If so, no need to ask them to enter a number.
if (Number(x) == x)
continue;
// Ask user to only enter in numbers
window.alert("Please only enter in numbers!");
} while (x != 5)
if (x != 5)
window.alert("You gave up!");
else
window.alert("Correct answer!");